Skip to content

Commit

Permalink
feat: use official github action for deploying to pages
Browse files Browse the repository at this point in the history
  • Loading branch information
MaddyUnderStars committed Oct 15, 2024
1 parent a127b31 commit caeabb7
Showing 1 changed file with 31 additions and 7 deletions.
38 changes: 31 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,48 @@ on:
push:
branches:
- main
workflow_dispatch:

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

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x

- run: python3 -m pip install -r requirements.txt

- run: mkdocs build
- name: build
id: build
run: |
python3 -m pip install -r requirements.txt
mkdocs build
# TODO: once this is deployed to the real site, uncomment
# - run: echo cmfive.com >> site/CNAME

- name: Deploy to pages
uses: JamesIves/github-pages-deploy-action@v4
- name: Upload artifact
id: deployment
uses: actions/upload-pages-artifact@v3
with:
folder: site
path: site/

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit caeabb7

Please sign in to comment.