mirror of
https://github.com/ForkAwesome/Fork-Awesome.git
synced 2024-12-25 21:11:32 +08:00
enable github action for gh-pages
This commit is contained in:
parent
0237ab8eaf
commit
f6e4f96ccd
35
.github/workflows/gh-pages.yml
vendored
Normal file
35
.github/workflows/gh-pages.yml
vendored
Normal 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
|
||||
|
Loading…
Reference in New Issue
Block a user