-
Notifications
You must be signed in to change notification settings - Fork 8
59 lines (49 loc) · 1.99 KB
/
prod.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
name: Documentation production pipeline
on:
push:
branches:
- main
jobs:
deploy:
name: Production publising
runs-on: ubuntu-latest
steps:
- name: CHECKOUT project
uses: actions/checkout@v4
with:
repository: aziontech/docs
ref: main
path: '.'
clean: true
fetch-depth: '0'
lfs: 'false'
- name: SETTING Node and Github Packages
uses: actions/setup-node@v4
with:
node-version: 20.13.1
registry-url: 'https://npm.pkg.github.com'
scope: '@aziontech'
always-auth: true
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_SECRET }}
- name: INSTALLING DEPENDENCIES
run: npm install
- name: CHECKER MEMORY
run: npm run check-memory
# - name: CHECKER
# run: npm run check
- name: BUILD
run: export NODE_OPTIONS="--max-old-space-size=8120" && export PUBLIC_GITHUB_TOKEN="${{ secrets.GH_PACKAGES_SECRET }}" && npm run build-production
- name: PREPARE TO DEPLOYMENT
run: rm -rf .eslintignore .eslintrc.js .prettierignore .prettierrc .nvmrc .npmrc pnpm-lock.yaml .astro .github node_modules src .editorconfig .gitignore astro.config.ts LICENSE package-lock.json package.json README.md tsconfig.json public plugins .git CODE_OF_CONDUCT.md helpcenter-cleaner.js postcss.config.js
- name: PREPARE DIST FOLDER
run: mv dist/* ./ && rm -rf dist; ls -la;
- name: DEPLOYMENT
uses: patrickwyler/[email protected]
with:
secrets: ${{ secrets.GCP_EXP_ENG }}
bucket: azdocs
- name: PURGE Documentation
run: npm install axios && node cicd/cdn-purge.js basic_token=${{ secrets.MKT_BASIC_TOKEN }}
- name: UPDATE Algolia data
run: npm install algoliasearch stream-json && node cicd/algolia-reindex.cjs app=${{ secrets.ALGOLIA_CONF_APP }} api=${{ secrets.ALGOLIA_CONF_API }}