Migrate from travisci to github actions
because all my other repos use it and hackernews told me travisci free tier is dead.
This commit is contained in:
parent
cdc54f17b1
commit
1b68e209ac
8 changed files with 76 additions and 46 deletions
43
org/testdata/misc.html
vendored
43
org/testdata/misc.html
vendored
|
@ -203,20 +203,35 @@ Paragraphs can contain inline markup like <em>emphasis</em> <strong>strong</stro
|
|||
<li>
|
||||
<p>example block</p>
|
||||
<pre class="example">
|
||||
language: go
|
||||
go: "1.x"
|
||||
script:
|
||||
- make test
|
||||
- make generate-gh-pages
|
||||
deploy:
|
||||
provider: pages
|
||||
github-token: $GITHUB_TOKEN # From travis-ci.org repository settings
|
||||
local-dir: gh-pages
|
||||
target-branch: gh-pages
|
||||
skip-cleanup: true
|
||||
verbose: true
|
||||
on:
|
||||
branch: master
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: git
|
||||
run: |
|
||||
git clone --depth 1 "https://x-access-token:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}" .
|
||||
git config user.name "GitHub Action"
|
||||
git config user.email "action@github.com"
|
||||
git log -1 --format="%H"
|
||||
- name: test
|
||||
run: make test
|
||||
- name: gh-pages
|
||||
run: |
|
||||
git checkout --orphan gh-pages && git reset
|
||||
make generate-gh-pages
|
||||
git add -f docs/ && git commit -m deploy
|
||||
git push -f origin gh-pages
|
||||
- name: notify
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
text="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID} failed"
|
||||
curl --silent --output /dev/null ${{secrets.TELEGRAM_URL}} -d "chat_id=${{secrets.TELEGRAM_CHAT_ID}}&text=${text}"
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue