-
Notifications
You must be signed in to change notification settings - Fork 35
35 lines (31 loc) · 949 Bytes
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: CI
on:
push: {}
pull_request: {}
workflow_dispatch: {}
schedule:
- cron: "0 0 * * *" # Every day at 00:00 UTC
jobs:
test_and_deploy:
name: Test and deploy
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install Rust
run: |
rustup update stable
rustup override set stable
- name: Build static website
run: cargo run --release
- name: Deploy to production
uses: rust-lang/simpleinfra/github-actions/static-websites@master
with:
deploy_dir: output
github_token: "${{ secrets.github_token }}"
cloudfront_distribution: E3URKC86CEGJWE
aws_access_key_id: "${{ secrets.aws_access_key_id }}"
aws_secret_access_key: "${{ secrets.aws_secret_access_key }}"
if: github.ref == 'refs/heads/master'