Skip to content

Commit c4d8a1a

Browse files
committed
New gh action for deployment.
1 parent 6e9ddb3 commit c4d8a1a

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This file was created automatically with `myst init --gh-pages` 🪄 💚
2+
3+
name: MyST GitHub Pages Deploy
4+
on:
5+
push:
6+
# Runs on pushes targeting the default branch
7+
branches: [main]
8+
env:
9+
# `BASE_URL` determines the website is served from, including CSS & JS assets
10+
# You may need to change this to `BASE_URL: ''`
11+
BASE_URL: /${{ github.event.repository.name }}
12+
13+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
20+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
21+
concurrency:
22+
group: 'pages'
23+
cancel-in-progress: false
24+
jobs:
25+
deploy:
26+
environment:
27+
name: github-pages
28+
url: ${{ steps.deployment.outputs.page_url }}
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
- name: Setup Pages
33+
uses: actions/configure-pages@v3
34+
- uses: actions/setup-node@v4
35+
with:
36+
node-version: 18.x
37+
- name: Install MyST Markdown
38+
run: npm install -g mystmd
39+
- name: Build HTML Assets
40+
run: myst build --html
41+
- name: Upload artifact
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: './_build/html'
45+
- name: Deploy to GitHub Pages
46+
id: deployment
47+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)