summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2019-08-13 12:43:15 +0200
committerPietro Albini <pietro@pietroalbini.org>2019-08-14 11:13:29 +0200
commit7b4959da6f85a73c7d1d62d1b53cd4b6fdcd2044 (patch)
tree4bb5b1b9990f4f1d1666e1d045bff0fc8d273fa1 /.github
parent2cb22a80da485e5cf6ce83f2c9454e88a197f14e (diff)
ci: add github actions
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/main.yml40
1 files changed, 40 insertions, 0 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000..f1340f1
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,40 @@
+on: [push, pull_request]
+
+jobs:
+ ci:
+ name: CI
+ runs-on: ubuntu-latest
+ steps:
+
+ - uses: actions/checkout@master
+ with:
+ fetch-depth: 1
+
+ - name: Install Rust Stable
+ run: |
+ rustc -vV
+ rustup update stable
+ rustup default stable
+ rustc -vV
+
+ - name: Validate the repository contents
+ run: cargo run -- check --strict
+ env:
+ GITHUB_TOKEN: ${{ secrets.github_token }}
+
+ - name: Run rustfmt
+ run: cargo fmt -- --check
+
+ - name: Run clippy
+ run: cargo clippy -- -Dwarnings
+
+ - name: Build the contents of the static API
+ run: |
+ cargo run -- static-api build
+ echo "team-api.infra.rust-lang.org" > build/CNAME
+
+ - uses: rust-lang/simpleinfra/github-actions/static-websites@master
+ with:
+ deploy_dir: build
+ github_token: "${{ secrets.github_token }}"
+ if: github.ref == 'refs/heads/master'