-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/wer-and-cer
- Loading branch information
Showing
14 changed files
with
166 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
on: | ||
push: | ||
tags: | ||
- '*.*.*' | ||
|
||
name: Create Github Release | ||
|
||
permissions: | ||
contents: write | ||
|
||
env: | ||
COMPOSE_USER: runner | ||
|
||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
env: | ||
COMPOSER_ALLOW_SUPERUSER: 1 | ||
APP_ENV: prod | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Composer install | ||
run: | | ||
docker network create frontend | ||
docker compose run --rm --user=root phpfpm composer install --no-dev -o --classmap-authoritative | ||
docker compose run --rm --user=root phpfpm composer clear-cache | ||
- name: Building assets for the frontend | ||
run: | | ||
docker compose run --rm node yarn install | ||
docker compose run --rm node yarn build | ||
- name: Build assets for Giv Din Stemme module | ||
run: | | ||
docker compose run --rm node yarn --cwd web/modules/custom/giv_din_stemme/ install | ||
docker compose run --rm node yarn --cwd web/modules/custom/giv_din_stemme/ build | ||
- name: Clean up | ||
run: | | ||
sudo chown -R runner:runner ./ | ||
rm -rf node_modules | ||
rm -rf web/modules/custom/giv_din_stemme/node_modules | ||
- name: Make assets dir | ||
run: | | ||
mkdir -p ../assets | ||
- name: Create archive | ||
run: | | ||
tar --exclude='.git' -zcf ../assets/${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz ./ | ||
- name: Create checksum | ||
run: | | ||
cd ../assets | ||
sha256sum ${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz > ../assets/checksum.txt | ||
- name: Create a release in GitHub and uploads assets | ||
run: gh release create ${{ github.ref_name }} --verify-tag --generate-notes ../assets/*.* | ||
env: | ||
GITHUB_TOKEN: ${{ github.TOKEN }} | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
when: | ||
- event: release | ||
|
||
skip_clone: true | ||
|
||
steps: | ||
- name: Ansible playbook | ||
image: itkdev/ansible-plugin:1 | ||
pull: true | ||
settings: | ||
id: | ||
from_secret: id | ||
secret: | ||
from_secret: secret | ||
host: | ||
from_secret: host | ||
path: | ||
from_secret: path | ||
user: | ||
from_secret: user | ||
playbook: 'release' | ||
pre_up: | ||
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes cache:rebuild | ||
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes deploy | ||
# Fixes issue with 'Drupal\mysql\Driver\Database\mysql\Connection' not found | ||
- itkdev-docker-compose-server run --rm phpfpm composer2 dump-autoload | ||
cron: | ||
cron: | ||
minute: '*/5' | ||
hour: '*' | ||
day: '*' | ||
month: '*' | ||
weekday: '*' | ||
job: 'itkdev-docker-compose-server exec phpfpm vendor/bin/drush --yes core:cron' | ||
# whisper: | ||
# minute: '0' | ||
# hour: '3' | ||
# day: '*' | ||
# month: '*' | ||
# weekday: '*' | ||
# job: 'itkdev-docker-compose-server exec phpfpm vendor/bin/drush --yes giv-din-stemme:qualify:all' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
when: | ||
- branch: release/* | ||
event: push | ||
|
||
skip_clone: true | ||
|
||
steps: | ||
- name: Run test site update | ||
image: itkdev/ansible-plugin:1 | ||
when: | ||
branch: release/* | ||
event: push | ||
pull: true | ||
settings: | ||
id: | ||
from_secret: id | ||
secret: | ||
from_secret: secret | ||
host: | ||
from_secret: stg_host | ||
path: | ||
from_secret: stg_path | ||
user: | ||
from_secret: user | ||
actions: | ||
- git reset --hard | ||
- git fetch origin ${CI_COMMIT_BRANCH} | ||
- git checkout ${CI_COMMIT_BRANCH} | ||
- git pull | ||
- itkdev-docker-compose-server up -d --force-recreate | ||
- itkdev-docker-compose-server exec phpfpm composer install | ||
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes cache:rebuild | ||
- itkdev-docker-compose-server run --rm phpfpm vendor/bin/drush --yes deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
services: | ||
phpfpm: | ||
volumes: | ||
- ../../shared/settings.local.php:/app/web/sites/default/settings.local.php | ||
- ../../shared/files:/app/web/sites/default/files | ||
- ../../shared/private:/app/private | ||
|
||
nginx: | ||
volumes: | ||
- ../../shared/files:/app/web/sites/default/files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters