-
Notifications
You must be signed in to change notification settings - Fork 141
62 lines (55 loc) · 1.62 KB
/
deploy-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Workflow for building and deploying Flagship Code™ Docs to GitHub Pages
#
name: Deploy Flagship Code™ Docs to Pages
on:
push:
branches: [main]
workflow_dispatch:
# No inputs
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
env:
BUILD_PATH: "./docs"
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3
- name: Setup Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # pin@v3
with:
node-version: v18.x
- name: Setup Pages
id: pages
uses: actions/configure-pages@fc89b04e7d263ef510d9e77d3a1d088fb2688522 # pin@v3
- name: Install dependencies
run: yarn install
working-directory: ${{ env.BUILD_PATH }}
- name: Build with Astro
run: |
yarn astro build \
--site "${{ steps.pages.outputs.origin }}" \
--base "${{ steps.pages.outputs.base_path }}"
working-directory: ${{ env.BUILD_PATH }}
- name: Upload artifact
uses: actions/upload-pages-artifact@253fd476ed429e83b7aae64a92a75b4ceb1a17cf # pin@v1
with:
path: ${{ env.BUILD_PATH }}/dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@497da40f5225e762159b457c9ae5d6f75a136f5c # pin@v1