Build and Deploy all generations #17
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: Build and Deploy all generations | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - actions | |
| - gen1 | |
| - gen2 | |
| jobs: | |
| build-and-deploy-all-gens: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout gen1 | |
| uses: actions/checkout@v2 | |
| with: | |
| ref: gen1 | |
| path: repo-gen1 | |
| - name : Checkout gen2 | |
| uses: actions/checkout@v2 | |
| with: | |
| ref: gen2 | |
| path: repo-gen2 | |
| - name: Set up Deno | |
| uses: denolib/setup-deno@v2 | |
| with: | |
| deno-version: v2.x | |
| - name: Build | |
| run: | | |
| mkdir dist | |
| for gen in 1 2; do | |
| cd ${{ github.workspace }}/repo-gen$gen | |
| make -e dist URL_BASE="https://ornithemc.net/mc-versions/gen$gen/" | |
| cp -Tr dist ${{ github.workspace }}/dist/gen$gen | |
| done | |
| ln -sr ${{ github.workspace }}/dist/gen1/version_manifest.json ${{ github.workspace }}/dist/version_manifest.json | |
| cd ${{ github.workspace }} | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: gh-pages-new | |
| publish_dir: dist |