Skip to content

Commit d436832

Browse files
committed
ci: update workflows
1 parent 0ad6c4c commit d436832

File tree

4 files changed

+61
-67
lines changed

4 files changed

+61
-67
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,5 @@ jobs:
2121
- name: Initialize CodeQL
2222
uses: github/codeql-action/init@v2
2323

24-
- name: Autobuild
25-
uses: github/codeql-action/autobuild@v2
26-
2724
- name: Perform CodeQL Analysis
2825
uses: github/codeql-action/analyze@v2

.github/workflows/continuous-delivery.yml

Lines changed: 4 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ name: Continuous Delivery
22

33
on:
44
workflow_dispatch:
5-
inputs:
6-
prNumber:
7-
description: The number of the PR that is being deployed
8-
required: true
95
push:
106
branches:
117
- main
@@ -21,71 +17,21 @@ jobs:
2117
fetch-depth: 0
2218
- name: Add TypeScript problem matcher
2319
run: echo "::add-matcher::.github/problemMatchers/tsc.json"
24-
- name: Use Node.js v16
20+
- name: Use Node.js v18
2521
uses: actions/setup-node@v3
2622
with:
27-
node-version: 16
23+
node-version: 18
2824
cache: yarn
2925
registry-url: https://registry.yarnpkg.com/
3026
- name: Install Dependencies
3127
run: yarn --immutable
3228
- name: Bump Version & Publish
3329
run: |
34-
# Resolve the tag to be used. "next" for push events, "pr-{prNumber}" for dispatch events.
35-
TAG=$([[ ${{ github.event_name }} == 'push' ]] && echo 'next' || echo 'pr-${{ github.event.inputs.prNumber }}')
36-
3730
yarn config set npmAuthToken ${NODE_AUTH_TOKEN}
3831
yarn config set npmPublishRegistry "https://registry.yarnpkg.com"
3932
40-
yarn bump --preid "${TAG}.$(git rev-parse --verify --short HEAD)"
33+
yarn bump --preid "next.$(git rev-parse --verify --short HEAD)"
4134
42-
yarn npm publish --tag ${TAG}
35+
yarn npm publish --tag next
4336
env:
4437
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
45-
46-
Docgen:
47-
name: Docgen
48-
runs-on: ubuntu-latest
49-
if: "github.event_name == 'push'"
50-
steps:
51-
- name: Checkout Project
52-
uses: actions/checkout@v3
53-
- name: Checkout Project
54-
uses: actions/checkout@v3
55-
with:
56-
ref: gh-pages
57-
path: out
58-
- name: Use Node.js v16
59-
uses: actions/setup-node@v3
60-
with:
61-
node-version: 16
62-
cache: yarn
63-
registry-url: https://registry.yarnpkg.com/
64-
- name: Install Dependencies
65-
run: yarn --immutable
66-
- name: Build documentation
67-
run: yarn docs
68-
- name: Publish Docs
69-
if: github.ref == 'refs/heads/main'
70-
run: |
71-
echo -e "\n# Remove any old files in the out folder"
72-
rm -rfv out/assets/*
73-
rm -rfv out/interfaces/*
74-
rm -rfv out/*.html
75-
76-
echo -e "\n# Move the generated docs to the newly-checked-out repo, to be committed and pushed"
77-
rsync -vaI LICENSE.md out/
78-
rsync -vaI README.md out/
79-
rsync -vaI docs/ out/
80-
81-
echo -e "\n# Commit and push"
82-
cd out
83-
git add --all .
84-
git config user.name "${GITHUB_ACTOR}"
85-
git config user.email "${GITHUB_EMAIL}"
86-
git commit -m "docs: api docs build for ${GITHUB_SHA}" || true
87-
git push origin $TARGET_BRANCH
88-
env:
89-
GITHUB_TOKEN: ${{ secrets.SKYRA_TOKEN }}
90-
GITHUB_ACTOR: NM-EEA-Y
91-
GITHUB_EMAIL: [email protected]

.github/workflows/continuous-integration.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ jobs:
1515
uses: actions/checkout@v3
1616
- name: Add problem matcher
1717
run: echo "::add-matcher::.github/problemMatchers/eslint.json"
18-
- name: Use Node.js v16
18+
- name: Use Node.js v18
1919
uses: actions/setup-node@v3
2020
with:
21-
node-version: 16
21+
node-version: 18
2222
cache: yarn
23+
registry-url: https://registry.yarnpkg.com/
2324
- name: Install Dependencies
24-
run: yarn --frozen-lockfile
25+
run: yarn --immutable
2526
- name: Run ESLint
2627
run: yarn lint --fix=false
2728

@@ -33,12 +34,13 @@ jobs:
3334
uses: actions/checkout@v3
3435
- name: Add problem matcher
3536
run: echo "::add-matcher::.github/problemMatchers/tsc.json"
36-
- name: Use Node.js v16
37+
- name: Use Node.js v18
3738
uses: actions/setup-node@v3
3839
with:
39-
node-version: 16
40+
node-version: 18
4041
cache: yarn
42+
registry-url: https://registry.yarnpkg.com/
4143
- name: Install Dependencies
42-
run: yarn --frozen-lockfile
44+
run: yarn --immutable
4345
- name: Build Code
4446
run: yarn build
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Deploy static content to Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: 'pages'
16+
cancel-in-progress: true
17+
18+
jobs:
19+
deploy:
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment.outputs.page_url }}
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v3
27+
- name: Setup Pages
28+
uses: actions/configure-pages@v3
29+
- name: Use Node.js v18
30+
uses: actions/setup-node@v3
31+
with:
32+
node-version: 18
33+
cache: yarn
34+
registry-url: https://registry.yarnpkg.com/
35+
- name: Generate Magidoc
36+
run: yarn docs
37+
- name: Add static files
38+
run: |
39+
printf "User-agent: *\nDisallow:" > docs/robots.txt
40+
cp .gitignore docs/
41+
cp LICENSE.md docs/
42+
cp README.md docs/
43+
- name: Upload artifact
44+
uses: actions/upload-pages-artifact@v1
45+
with:
46+
path: docs/
47+
- name: Deploy to GitHub Pages
48+
id: deployment
49+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)