From f6e4f96ccd22a032a44af71327c1207593ad3677 Mon Sep 17 00:00:00 2001 From: Thomas Clavier Date: Wed, 22 Nov 2023 22:53:27 +0100 Subject: [PATCH] enable github action for gh-pages --- .github/workflows/gh-pages.yml | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/gh-pages.yml diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 000000000..795c8d6c9 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -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 +