Skip to content

Commit 28072c1

Browse files
committed
build gh pages
1 parent 7dbf92f commit 28072c1

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

.github/workflows/deploy.yml

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

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# MyST build outputs
2+
_build

0 commit comments

Comments
 (0)