commit 94106013467a2b88d0241f88d579bf63ba6b38ab migrations #1428
This file contains hidden or 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
| --- | |
| name: Wikipedia Library - test and deploy | |
| on: | |
| push: | |
| branches: ["master", "staging"] | |
| pull_request: | |
| branches: ["master"] | |
| jobs: | |
| cicd: | |
| runs-on: ubuntu-latest | |
| environment: cicd | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - name: build & run | |
| run: > | |
| sudo .cicd/build.sh | |
| ${GITHUB_HEAD_REF:-$GITHUB_REF_NAME} | |
| ${GITHUB_SHA} | |
| - name: migrate | |
| run: > | |
| docker compose exec --no-TTY twlight | |
| bin/virtualenv_migrate.sh | |
| - name: translate | |
| run: > | |
| docker compose exec --no-TTY twlight | |
| bin/virtualenv_translate.sh last-commit | |
| - name: test | |
| run: > | |
| docker compose exec --no-TTY twlight | |
| bin/virtualenv_test.sh | |
| - name: deploy | |
| env: | |
| WIKIBOT_TOKEN: ${{secrets.WIKIBOT_TOKEN}} | |
| QUAYBOT_USERNAME: ${{secrets.QUAYBOT_USERNAME}} | |
| QUAYBOT_PASSWORD: ${{secrets.QUAYBOT_PASSWORD}} | |
| run: > | |
| sudo .cicd/deploy.sh | |
| ${GITHUB_REF_NAME} | |
| ${GITHUB_SHA} | |
| ${GITHUB_EVENT_NAME} | |
| ${GITHUB_REPOSITORY} | |
| ${WIKIBOT_TOKEN} | |
| ${QUAYBOT_USERNAME} | |
| ${QUAYBOT_PASSWORD} | |
| - name: cleanup | |
| if: always() | |
| run: sudo chown -R ${USER}:${USER} . |