Skip to content

Merge pull request #67 from chaemon/master #154

Merge pull request #67 from chaemon/master

Merge pull request #67 from chaemon/master #154

Workflow file for this run

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