Skip to content

Commit 866158f

Browse files
committed
Add automatic deployment via GitHub Actions
1 parent e497fe7 commit 866158f

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: deploy
2+
on: {push: {branches: [source]}}
3+
defaults:
4+
run:
5+
working-directory: repo
6+
jobs:
7+
deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
with: { path: repo }
12+
- uses: actions/setup-node@v2
13+
with:
14+
node-version: '14'
15+
- uses: Bogdanp/setup-racket@v1.5
16+
with:
17+
version: '8.1'
18+
dest: '$GITHUB_WORKSPACE/racket'
19+
sudo: never
20+
21+
- name: install
22+
run: |
23+
yarn install
24+
raco pkg install --batch --installation --auto --update-deps --link blog
25+
- name: build
26+
run: |
27+
yarn run build
28+
racket blog/build.rkt
29+
30+
- name: deploy
31+
run: |
32+
cd output
33+
git init -b gh-pages
34+
git config user.name 'GitHub Actions'
35+
git config user.email 'lexi.lambda@gmail.com'
36+
git add .
37+
git commit -m 'Deploy to GitHub Pages'
38+
git push --force 'https://lexi-lambda:${{ github.token }}@github.com/${{ github.repository }}' gh-pages

0 commit comments

Comments
 (0)