-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (50 loc) · 1.6 KB
/
verify.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
name: verify
on: push
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
- name: Install dependencies
run: pip3 install -U online-judge-verify-helper
# required only if you want to verify Nim code
- name: Cache choosenim
id: cache-choosenim
uses: actions/cache@v1
with:
path: ~/.choosenim
key: ${{ runner.os }}-choosenim-stable
- name: Cache nimble
id: cache-nimble
uses: actions/cache@v1
with:
path: ~/.nimble
key: ${{ runner.os }}-nimble-stable
- uses: jiro4989/setup-nim-action@v1
with:
nim-version: 1.0.6
- name: copy document_ja
run: |
mv document_ja/ src
- name: Copy documents to /docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.ref == 'refs/heads/master' }}
run: |
git config --global user.name GitHub
git config --global user.email [email protected]
git switch gh-pages
rm -rf docs
cp -R src docs
git add -A
git add docs
git commit -m "[workflow] copy docs $(git rev-parse HEAD~1)"
git push "https://${{ secrets.GH_PAT }}@github.com/zer0-star/Nim-ACL.git" gh-pages
- name: Run tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
YUKICODER_TOKEN: ${{ secrets.YUKICODER_TOKEN }}
GH_PAT: ${{ secrets.GH_PAT }}
run: cd src && oj-verify all