enable github action for gh-pages

This commit is contained in:
Thomas Clavier 2023-11-22 22:53:27 +01:00
parent 0237ab8eaf
commit f6e4f96ccd
No known key found for this signature in database
GPG key ID: 20CCE23E53E6E41A

35
.github/workflows/gh-pages.yml vendored Normal file
View file

@ -0,0 +1,35 @@
name: Github Pages
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
pages: write
id-token: write
jobs:
pages:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag fa-builder
- name: build Pages
run: |
mkdir _site
docker run -u $(id -u):$(id -g) -v $(pwd):/workspace fa-builder npm run build
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v1
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2