-
Notifications
You must be signed in to change notification settings - Fork 16
56 lines (47 loc) · 1.58 KB
/
build.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
name: Netlify Deploy
on:
# push:
# branches:
# - 'main'
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository
uses: 'actions/checkout@v4'
- name: Install static-sitemap-cli
run: npm install static-sitemap-cli
- name: Setup mdBook
uses: extractions/setup-crate@v1
with:
owner: rust-lang
name: mdbook
- name: Generate the Wiki
run: mdbook build
# TODOL fix the issue when the sitemap doesn't get generated when a commit is directly pushed to the main branch
- name: Generate sitemap
run: |
cd book
npx sscli --no-clean --base https://wiki.developersindia.in
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: 'book'
production-branch: main
production-deploy: true
netlify-config-path: netlify.toml
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-pull-request-comment: false
enable-commit-comment: false
overwrites-pull-request-comment: false
github-deployment-environment: "Netlify Deployment"
github-deployment-description: "The production deployment environment on Netlify."
fails-without-credentials: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1