From b73b48de16309e0aa3d5f971799af695eaf8e709 Mon Sep 17 00:00:00 2001 From: Yujia Qiao Date: Sun, 18 Sep 2022 23:24:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E9=83=A8=E7=BD=B2=20GitHub?= =?UTF-8?q?=20Pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 53 ++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..3d33fc7 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,53 @@ +name: Makefile CI + +on: + push: + branches: master + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Setup Python + uses: actions/setup-python@v4.2.0 + + - name: Install dependencies + run: pip install sphinx + + - name: Build Pages + run: make html && cp _build/html/README.html _build/html/index.html + + - name: Upload Artifact + uses: actions/upload-pages-artifact@v1 + with: + path: _build/html + + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Setup Pages + uses: actions/configure-pages@v2 + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1