From: Jerry Wang Date: Sun, 1 Aug 2021 21:51:00 +0000 (+0100) Subject: Publish GitHub Page with GitHub Action X-Git-Tag: latest~210^2 X-Git-Url: https://www.ivnss.com/gitweb/?a=commitdiff_plain;h=937acfa0d768f40cfa4a3077535ab55df70dbe2d;p=lkmpg Publish GitHub Page with GitHub Action Add a new Github Action to publish to the GitHub page. Use twtug/lkmpg image for reproducibility. Ref: - sysprog21#27 - https://github.com/TeXtw/docker-lkmpg --- diff --git a/.github/workflows/deploy_github_page.yaml b/.github/workflows/deploy_github_page.yaml new file mode 100644 index 0000000..3c936d2 --- /dev/null +++ b/.github/workflows/deploy_github_page.yaml @@ -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 diff --git a/.github/workflows/generate_doc.yml b/.github/workflows/generate_doc.yml new file mode 100644 index 0000000..1bc6528 --- /dev/null +++ b/.github/workflows/generate_doc.yml @@ -0,0 +1,37 @@ +name: build-deploy-assets + +on: + push: + branches: [ master ] + + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + container: twtug/lkmpg + + steps: + - uses: actions/checkout@v2 + - name: Build + run: | + make all + make html + tar zcvf lkmpg-html.tar.gz ./html + - name: Delete old release asset + uses: mknejp/delete-release-assets@v1 + with: + token: ${{ github.token }} + fail-if-no-assets: false + tag: latest + assets: | + lkmpg.pdf + lkmpg-html.tar.gz + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: | + lkmpg.pdf + lkmpg-html.tar.gz + tag_name: "latest" + prerelease: true diff --git a/.github/workflows/generate_pdf.yml b/.github/workflows/generate_pdf.yml deleted file mode 100644 index 90c2ebd..0000000 --- a/.github/workflows/generate_pdf.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: build-deploy-assets - -on: - push: - branches: [ master ] - - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - container: texlive/texlive - - steps: - - uses: actions/checkout@v2 - - name: Build - run: make all - - name: Delete old release asset - uses: mknejp/delete-release-assets@v1 - with: - token: ${{ github.token }} - fail-if-no-assets: false - tag: latest - assets: lkmpg.pdf - - name: Release - uses: softprops/action-gh-release@v1 - with: - files: lkmpg.pdf - tag_name: "latest" - prerelease: true