-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #426 from itk-dev/hotfix/deployment
Deployment
- Loading branch information
Showing
9 changed files
with
128 additions
and
107 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 was deleted.
Oops, something went wrong.
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,25 @@ | ||
#### Link to ticket | ||
|
||
Please add a link to the ticket being addressed by this change. | ||
|
||
#### Description | ||
|
||
Please include a short description of the suggested change and the reasoning behind the approach you have chosen. | ||
|
||
#### Screenshot of the result | ||
|
||
If your change affects the user interface you should include a screenshot of the result with the pull request. | ||
|
||
#### Checklist | ||
|
||
- [ ] My code is covered by test cases. | ||
- [ ] My code passes our test (all our tests). | ||
- [ ] My code passes our static analysis suite. | ||
- [ ] My code passes our continuous integration process. | ||
|
||
If your code does not pass all the requirements on the checklist you have to add a comment explaining why this change | ||
should be exempt from the list. | ||
|
||
#### Additional comments or questions | ||
|
||
If you have any further comments or questions for the reviewer please add them here. |
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,54 @@ | ||
on: | ||
push: | ||
tags: | ||
- '*.*.*' | ||
|
||
name: Create Github Release | ||
|
||
permissions: | ||
contents: write | ||
|
||
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 --cwd /app/web/themes/custom/hoeringsportal install | ||
docker compose run --rm node yarn --cwd /app/web/themes/custom/hoeringsportal build | ||
- name: Clean up | ||
run: | | ||
sudo chown -R runner:runner ./ | ||
rm -rf web/themes/custom/hoeringsportal/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,32 @@ | ||
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 | ||
cron: | ||
cron: | ||
minute: '0' | ||
hour: '*' | ||
day: '*' | ||
month: '*' | ||
weekday: '*' | ||
job: 'itkdev-docker-compose-server exec phpfpm vendor/bin/drush core:cron' |
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