Skip to content

Commit

Permalink
chore: update deploy docs action
Browse files Browse the repository at this point in the history
  • Loading branch information
lepture committed Apr 14, 2024
1 parent d13aca4 commit 977cde5
Showing 1 changed file with 10 additions and 21 deletions.
31 changes: 10 additions & 21 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ on:

workflow_dispatch:


permissions:
contents: read
deployments: write
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
Expand All @@ -22,11 +24,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: "3.11"

- name: Install deps
run: python -m pip install -r docs/requirements.txt
Expand All @@ -39,29 +41,16 @@ jobs:

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: pages
path: _site

deploy:
environment:
name: cloudflare-pages
url: ${{ steps.deployment.outputs.url }}
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
needs: build

steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: pages

- name: Deploy to Cloudflare Pages
- name: Deploy to GitHub Pages
id: deployment
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: otpauth-doc
directory: .
uses: actions/deploy-pages@v4

0 comments on commit 977cde5

Please sign in to comment.