Skip to content

Commit bb71917

Browse files
authored
Merge pull request #509 from XAMPPRocky/gh-actions
Switch to GitHub Actions from Travis CI
2 parents 8a3ee85 + 3e78057 commit bb71917

File tree

3 files changed

+29
-36
lines changed

3 files changed

+29
-36
lines changed

.github/workflows/main.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
8+
jobs:
9+
ci:
10+
name: CI
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Cache cargo
15+
uses: actions/cache@v1
16+
with:
17+
path: target
18+
key: cargo-build-${{ hashFiles('**/Cargo.lock') }}
19+
restore-key: cargo-build-
20+
- name: Build Blog
21+
run: cargo run
22+
- name: Deploy to GitHub Pages
23+
run: |
24+
cp CNAME ./site/
25+
curl -LsSf https://raw.githubusercontent.com/rust-lang/simpleinfra/master/setup-deploy-keys/src/deploy.rs | rustc - -o /tmp/deploy
26+
(cd site/ && /tmp/deploy)
27+
env:
28+
GITHUB_DEPLOY_KEY: ${{ secrets.GITHUB_DEPLOY_KEY }}
29+
if: github.ref == 'refs/heads/master'

.travis.yml

-7
This file was deleted.

deploy.sh

-29
This file was deleted.

0 commit comments

Comments
 (0)