Merge pull request #787 from dodona-edu/dependabot/npm_and_yarn/webpa… #543
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
name: Deploy on GitHub Pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
environment: | |
name: production | |
url: https://docs.dodona.be/papyros/ | |
steps: | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Checkout branch | |
uses: actions/checkout@v4 | |
- name: Clone main | |
uses: actions/checkout@v4 | |
with: | |
repository: dodona-edu/papyros | |
path: papyros | |
ref: main | |
- name: Install and build main | |
run: | | |
cd papyros | |
yarn install | |
yarn setup | |
yarn build:app | |
cp -r public/* dist | |
cd .. | |
- name: Install and build branch | |
run: | | |
yarn install | |
yarn setup | |
yarn build:app | |
cp -r public/* dist | |
- name: Prepare builds to be deployed | |
run: | | |
mv dist devdist | |
mv papyros/dist dist | |
mv devdist dist/dev | |
- name: Deploy 🚀 | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: dist # The folder the action should deploy. |