mirror of
https://github.com/DataDog/go-profiler-notes.git
synced 2026-06-23 09:56:47 +08:00
try other deploy approach
This commit is contained in:
parent
b4f5056699
commit
deadb69ee7
1 changed files with 38 additions and 20 deletions
58
.github/workflows/gh-pages.yml
vendored
58
.github/workflows/gh-pages.yml
vendored
|
|
@ -1,26 +1,44 @@
|
||||||
name: GitHub Pages
|
name: Deploy to GitHub Pages
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
# Runs on pushes targeting the default branch
|
||||||
push:
|
push:
|
||||||
branches:
|
branches: ["sphinx"]
|
||||||
- sphinx # Set a branch name to trigger deployment
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
pull_request:
|
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:
|
jobs:
|
||||||
deploy:
|
# Build job
|
||||||
runs-on: ubuntu-22.04
|
build:
|
||||||
permissions:
|
runs-on: ubuntu-latest
|
||||||
contents: write
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: Checkout
|
||||||
- name: Deploy
|
uses: actions/checkout@v3
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
- name: Setup Pages
|
||||||
# If you're changing the branch from main,
|
uses: actions/configure-pages@v2
|
||||||
# also change the `main` in `refs/heads/main`
|
- run: "mkdir -p _site && echo foo > _site/index.html"
|
||||||
# below accordingly.
|
- name: Upload artifact
|
||||||
if: ${{ github.ref == 'refs/heads/sphinx' }}
|
uses: actions/upload-pages-artifact@v1
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
# Deployment job
|
||||||
publish_dir: ./test
|
deploy:
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
id: deployment
|
||||||
|
uses: actions/deploy-pages@v1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue