Skip to content

vyxal3-release

vyxal3-release #46

Workflow file for this run

name: Create release from tag
on:
repository_dispatch:
types: [vyxal3-release]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
id-token: write
pages: write
# Allow one concurrent deployment
concurrency:
group: "release"
cancel-in-progress: true
jobs:
# This goes in the website
release:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "adopt"
- name: Clone vyxal.github.io
run: git clone https://github.com/Vyxal/vyxal.github.io.git
- name: Install build dependencies
working-directory: ./vyxal.github.io
run: npm install
- name: Compile in archive mode
working-directory: ./vyxal.github.io
run: npx webpack --mode production --env vy-archive=vyxal --progress
- name: Clone the Vyxal repository
working-directory: ./vyxal.github.io
run: git clone https://github.com/Vyxal/Vyxal.git -b ${{github.event.client_payload.tag}}
- name: Compile Vyxal
working-directory: ./vyxal.github.io/Vyxal/
run: ./mill js.fullLinkJS
- name: Generate theseus data
working-directory: ./vyxal.github.io/Vyxal/
run: ./mill jvm.theseus
- name: Move everything into the right places
run: |
mv -v vyxal.github.io/Vyxal/pages/ vyxal.github.io/dist/vyxal
mv vyxal.github.io/dist/ ./${{github.event.client_payload.tag}}
rm -rfd vyxal.github.io
- name: Update versions.json
run: python helpers/update_versions_files.py ${{github.event.client_payload.tag}}
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Push new version files.
- name: Upload built HTML
uses: actions/upload-pages-artifact@v1
with:
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1