Skip to content

Release to GitHub pages #71

Release to GitHub pages

Release to GitHub pages #71

Workflow file for this run

name: Release to GitHub pages
on:
workflow_dispatch:
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: 'pages'
cancel-in-progress: false
jobs:
buildprep:
uses: rdamazio/efis-editor/.github/workflows/build-prep.yml@main
permissions:
contents: read
build:
runs-on: ubuntu-latest
needs: buildprep
permissions:
contents: read
steps:
- name: Fetch prepared artifacts
uses: actions/download-artifact@v4
with:
name: prepared-source
- name: Extract prepared artifacts
run: tar xf prepared-source.tar
- name: Run tests
run: npm run test:headless
- name: Build
run: npm run build:prod
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: dist/efis-editor/browser
deploy:
runs-on: ubuntu-latest
needs: build
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages and setting a tag.
permissions:
contents: write
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Create tag
uses: actions/github-script@v7
with:
script: |
github.rest.git.updateRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'tags/ghpages',
sha: context.sha
})