-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.49 KB
/
main.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
name: Automatic Deployment
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Rust env
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- name: Setup Node env
uses: actions/setup-node@v2
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- name: Welcome
run: echo Start deploying CodingCamp
- name: Install Solana CLI
run: sh -c "$(curl -sSfL https://release.solana.com/stable/install)"
- name: Reload PATH
run: |
source ~/.profile && source ~/.bash_profile
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
solana --version
- name: Install dependencies
run: |
npm i -g @project-serum/[email protected]
npm install
- name: Build the program and library
run: |
anchor build
npm run build
- name: Publish the package
run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Deploy docs to gh-pages branch
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npm run deploy -- -u "github-actions-bot <[email protected]>"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}