mirror of
https://github.com/sysprog21/lkmpg.git
synced 2025-01-23 07:10:07 +08:00
Merge pull request #32 from focaaby/master
Publish GitHub Pages with GitHub Actions
This commit is contained in:
commit
859af5f727
24
.github/workflows/deploy_github_page.yaml
vendored
Normal file
24
.github/workflows/deploy_github_page.yaml
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
name: build-deploy-github-page
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: twtug/lkmpg
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
make html
|
||||||
|
- name: Deploy to gh-pages branch
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: ./html
|
||||||
|
publish_branch: gh-pages
|
|
@ -9,22 +9,29 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: texlive/texlive
|
container: twtug/lkmpg
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Build
|
- name: Build
|
||||||
run: make all
|
run: |
|
||||||
|
make all
|
||||||
|
make html
|
||||||
|
tar zcvf lkmpg-html.tar.gz ./html
|
||||||
- name: Delete old release asset
|
- name: Delete old release asset
|
||||||
uses: mknejp/delete-release-assets@v1
|
uses: mknejp/delete-release-assets@v1
|
||||||
with:
|
with:
|
||||||
token: ${{ github.token }}
|
token: ${{ github.token }}
|
||||||
fail-if-no-assets: false
|
fail-if-no-assets: false
|
||||||
tag: latest
|
tag: latest
|
||||||
assets: lkmpg.pdf
|
assets: |
|
||||||
|
lkmpg.pdf
|
||||||
|
lkmpg-html.tar.gz
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
files: lkmpg.pdf
|
files: |
|
||||||
|
lkmpg.pdf
|
||||||
|
lkmpg-html.tar.gz
|
||||||
tag_name: "latest"
|
tag_name: "latest"
|
||||||
prerelease: true
|
prerelease: true
|
Loading…
Reference in New Issue
Block a user