Update work mode reference #115
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and push | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
permissions: | |
deployments: write | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install social card dependencies | |
run: sudo apt-get install -y libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev | |
- name: Setup Python | |
id: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11.0" | |
- name: Install Python dependencies | |
run: pip install mkdocs mkdocs-techdocs-core | |
- uses: actions/cache@v3 | |
with: | |
key: ${{ github.ref }} | |
path: .cache | |
- run: pip install git+https://${{ secrets.GH_TOKEN }}@github.com/squidfunk/mkdocs-material-insiders.git Pillow cairosvg | |
- name: Gather files to build | |
run: ./setup-site.sh | |
- name: Build site | |
run: mkdocs build | |
- name: Publish to Cloudflare Pages | |
id: cloudflare-publish | |
if: ${{ !env.ACT }} | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: 8e782a355544971b192db9e75d789dca | |
projectName: 9kdotfiles | |
directory: site | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
- uses: mshick/add-pr-comment@v2 | |
if: ${{ !env.ACT }} | |
with: | |
message: | | |
🚀 This branch can be previewed at ${{ steps.cloudflare-publish.outputs.url }} |