Fork-Awesome/.github/workflows/gh-pages.yml

36 lines
813 B
YAML
Raw Normal View History

2023-11-23 05:53:27 +08:00
name: Github Pages
on:
push:
2023-11-24 05:12:19 +08:00
branches: [ "master" ]
2023-11-23 05:53:27 +08:00
pull_request:
2023-11-24 05:12:19 +08:00
branches: [ "master" ]
2023-11-23 05:53:27 +08:00
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
2023-11-24 17:53:04 +08:00
docker run -u $(id -u):$(id -g) -v $(pwd):/workspace fa-builder bash -c "export HOME=/workspace; npm install; npm run build"
2023-11-23 05:53:27 +08:00
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v1
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2