1
1
mirror of https://github.com/wez/wezterm.git synced 2024-08-18 02:30:57 +03:00

ci: docs: deploy directly, rather than via gh_pages branch

This commit is contained in:
Wez Furlong 2023-02-25 17:49:57 -07:00
parent c5247d21fa
commit 494fab09ba
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387

View File

@ -14,8 +14,21 @@ on:
schedule:
- cron: "50 * * * *"
# 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
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
publish:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
@ -56,13 +69,18 @@ jobs:
run: |
source $HOME/.cargo/env
./ci/build-docs.sh
- name: Deploy
if: success()
uses: crazy-max/ghaction-github-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
target_branch: gh-pages
build_dir: gh_pages/html
keep_history: true
allow_empty_commit: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
path: gh_pages/html
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v1