Skip to content

Add rendering of the web into a directory #2174

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

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
Draft
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
35 changes: 32 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: CI
on: [push, pull_request]
on: [ push, pull_request ]
env:
RUST_BACKTRACE: 1
jobs:
Expand All @@ -12,8 +12,7 @@ jobs:
with:
components: rustfmt

- name: Formatting
run: cargo fmt --all -- --check
- uses: Swatinem/rust-cache@v2

- name: Test
run: |
Expand All @@ -22,3 +21,33 @@ jobs:
cargo build --all --locked
cargo clippy -- --deny warnings
cargo test --all --locked

- name: Formatting
run: cargo fmt --all -- --check

- name: Build website
run: cargo run
env:
BASE_URL: "/www.rust-lang.org"

- name: Configure GitHub Pages
uses: actions/configure-pages@v5

- name: Upload website
uses: actions/upload-pages-artifact@v3
with:
path: html

deploy:
needs: [ build ]
if: github.ref == 'refs/heads/master'
Comment on lines +41 to +43
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the deploy branch is the one triggering a deployment. I would be fine with deploying from master. @Manishearth what do you think?

environment:
name: github-pages
permissions:
contents: read
pages: write
id-token: write
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
Loading
Loading