Skip to content

Commit c745cc6

Browse files
authored
Fix deployment script to re-enable hacklang.org publishing (#38)
* Update I18n file * Fix deployment script * Move website from sub-folder to root * Update Node version in builder --------- Co-authored-by: Tommy Lillehagen <tlil@meta.com>
1 parent 6a9329e commit c745cc6

18 files changed

Lines changed: 7670 additions & 4514 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@ on:
77
branches: [main]
88

99
jobs:
10+
1011
checks:
12+
name: Check Docusaurus Build
1113
if: github.event_name != 'push'
1214
runs-on: ubuntu-latest
1315
steps:
14-
- uses: actions/checkout@v1
15-
- uses: actions/setup-node@v1
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
1618
with:
17-
node-version: '12.x'
19+
node-version: 24
20+
cache: npm
1821
- name: Test Build
1922
run: |
20-
cd website
2123
if [ -e yarn.lock ]; then
2224
yarn install --frozen-lockfile
2325
elif [ -e package-lock.json ]; then
@@ -26,30 +28,48 @@ jobs:
2628
npm i
2729
fi
2830
npm run build
29-
gh-release:
31+
32+
build:
33+
name: Build Docusaurus
3034
if: github.event_name != 'pull_request'
3135
runs-on: ubuntu-latest
3236
steps:
33-
- uses: actions/checkout@v1
34-
- uses: actions/setup-node@v1
35-
with:
36-
node-version: '12.x'
37-
- uses: webfactory/ssh-agent@v0.5.0
37+
- uses: actions/checkout@v4
38+
- uses: actions/setup-node@v4
3839
with:
39-
ssh-private-key: ${{ secrets.DOCUSAURUS_SSH_KEY}}
40+
node-version: 24
41+
cache: npm
4042
- name: Release to GitHub Pages
41-
env:
42-
USE_SSH: true
43-
GIT_USER: git
4443
run: |
45-
cd website
46-
git config --global user.email "actions@github.com"
47-
git config --global user.name "gh-actions"
4844
if [ -e yarn.lock ]; then
4945
yarn install --frozen-lockfile
5046
elif [ -e package-lock.json ]; then
5147
npm ci
5248
else
5349
npm i
5450
fi
55-
USE_SSH=true npm run publish-gh-pages
51+
npm run build
52+
- name: Upload Build Artifact
53+
uses: actions/upload-pages-artifact@v3
54+
with:
55+
path: build
56+
57+
deploy:
58+
name: Deploy to GitHub Pages
59+
needs: build
60+
61+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
62+
permissions:
63+
pages: write # to deploy to Pages
64+
id-token: write # to verify the deployment originates from an appropriate source
65+
66+
# Deploy to the github-pages environment
67+
environment:
68+
name: github-pages
69+
url: ${{ steps.deployment.outputs.page_url }}
70+
71+
runs-on: ubuntu-latest
72+
steps:
73+
- name: Deploy to GitHub Pages
74+
id: deployment
75+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ yarn-error.log
1313
lib/core/metadata.js
1414
lib/core/MetadataBlog.js
1515

16-
website/translated_docs
17-
website/build/
18-
website/yarn.lock
19-
website/node_modules
20-
website/i18n/*
21-
website/package-lock.json
22-
website/yarn-error.log
23-
!website/i18n/en.json
16+
translated_docs
17+
build/
18+
yarn.lock
19+
node_modules
20+
i18n/*
21+
package-lock.json
22+
yarn-error.log
23+
!i18n/en.json
File renamed without changes.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
"GitHub": "GitHub",
1212
"Twitter": "Twitter",
1313
"HHVM": "HHVM",
14-
"Blog": "Blog"
14+
"Blog": "Blog",
15+
"Terms of Use": "Terms of Use",
16+
"Privacy Policy": "Privacy Policy"
1517
},
1618
"categories": {
1719
"Docusaurus": "Docusaurus",
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)