-
Notifications
You must be signed in to change notification settings - Fork 737
68 lines (59 loc) · 2.26 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: docs
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18
uses: actions/setup-node@v2-beta
with:
node-version: 18
- name: Enable corepack
run: |
corepack enable
corepack prepare yarn@stable --activate
- name: Set git identity
run: |
git config --global user.name "Martin Adámek"
git config --global user.email "[email protected]"
- name: Build & deploy docs
run: |
# install project deps
yarn
# go to website dir
cd website
# install website deps
yarn
# build and deploy the docs
yarn deploy
env:
GIT_USER: "B4nan:${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}"
GH_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
APIFY_SIGNING_TOKEN: ${{ secrets.APIFY_SIGNING_TOKEN }}
squash:
runs-on: ubuntu-latest
needs: [ build ]
steps:
- uses: actions/checkout@v4
with:
ref: 'gh-pages'
fetch-depth: 0
- name: Set git identity
run: |
git config --global user.name "Martin Adámek"
git config --global user.email "[email protected]"
- name: Squash all commits to reduce repository size
run: |
TOTAL_COMMITS="$(($(git rev-list --count HEAD)-1))"
echo "squashing $TOTAL_COMMITS commits"
git reset HEAD~$TOTAL_COMMITS
git add .
git commit --amend -m 'crawlee.dev docs'
git push --force origin gh-pages
env:
GIT_USER: "B4nan:${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}"
GH_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}