Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Travis CI with GHA #47

Merged
merged 2 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Continuous Integration

on:
push:
branches:
- master
pull_request:

jobs:
book-test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install mdbook
run: |
cargo install --version "^0.4.5" mdbook
cargo install --version "^1.3.1" skill-tree

- name: mdbook test
run: |
mdbook build
mdbook test

- name: check skill-tree
run: skill-tree roadmap.toml book/roadmap

- name: Deploy GitHub Pages
if: github.ref == 'refs/heads/master'
run: |
git worktree add gh-pages gh-pages
git config user.name "Deploy from CI"
git config user.email ""
cd gh-pages
# Delete the ref to avoid keeping history.
git update-ref -d refs/heads/gh-pages
rm -rf *
mv ../book/* .
git add .
git commit -m "Deploy $GITHUB_SHA to gh-pages"
git push --force
jyn514 marked this conversation as resolved.
Show resolved Hide resolved
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.