-
Notifications
You must be signed in to change notification settings - Fork 25
47 lines (40 loc) · 1.29 KB
/
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
name: docs
on: [push]
permissions: write-all
# permissions:
# contents: write
# deployments: write
# pull-requests: write
# repository-projects: write
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
# Get GitHub token via the CT SDKs App
- name: Generate GitHub token (via CT SDKs App)
id: generate_github_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.CT_SDKS_APP_ID }}
private-key: ${{ secrets.CT_SDKS_APP_PEM }}
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Install and Build 🔧
run: |
yarn install --frozen-lockfile
yarn docs
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs # The folder the action should deploy.
token: ${{ steps.generate_github_token.outputs.token }}
force: false
- name: Create GitHub deployment 🎉
uses: chrnorm/deployment-action@v2
id: deployment
with:
token: ${{ steps.generate_github_token.outputs.token }}
environment-url: https://commercetools.github.io/commercetools-sdk-typescript
environment: production
repo: gh-pages