Remove hello world and style input field #70
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release to GitHub Pages | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- edited | |
paths: | |
- ".github/workflows/github-pages.yaml" | |
- "src/**" | |
- "index.html" | |
- "rust-toolchain.toml" | |
- "Cargo.toml" | |
- "Cargo.lock" | |
- "Trunk.toml" | |
push: | |
branches: | |
- "main" | |
paths: | |
- ".github/workflows/github-pages.yaml" | |
- "src/**" | |
- "index.html" | |
- "rust-toolchain.toml" | |
- "Cargo.toml" | |
- "Cargo.lock" | |
- "Trunk.toml" | |
# Allows for running this workflow manually from Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
# Do dry-run if we are in a PR context | |
if: github.event_name == 'pull_request' | |
name: Build Website | |
timeout-minutes: 10 | |
runs-on: self-hosted | |
env: | |
CARGO_HOME: "/media/nicholas/rust/.cargo" | |
RUSTUP_HOME: "/media/nicholas/rust/.rustup" | |
RUSTC_WRAPPER: "/media/nicholas/rust/.cargo/bin/sccache" | |
CARGO_INCREMENTAL: 0 | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
# - if: steps.skip_check.outputs.should_skip != 'true' | |
# name: Compile Tailwind CSS Classes | |
# run: tailwindcss --config tailwind.config.js -i main.css -o dist/compiled.css | |
- run: trunk build --release | |
build-and-deploy: | |
# Only publish if we have pushed code, not in a PR context | |
if: github.event_name == 'push' | |
name: Build & Deploy Website | |
timeout-minutes: 10 | |
runs-on: self-hosted | |
permissions: | |
contents: write # for committing to gh-pages branch. | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
env: | |
CARGO_HOME: "/media/nicholas/rust/.cargo" | |
RUSTUP_HOME: "/media/nicholas/rust/.rustup" | |
RUSTC_WRAPPER: "/media/nicholas/rust/.cargo/bin/sccache" | |
CARGO_INCREMENTAL: 0 | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
# - if: steps.skip_check.outputs.should_skip != 'true' | |
# name: Compile Tailwind CSS Classes | |
# run: tailwindcss --config tailwind.config.js -i main.css -o dist/compiled.css | |
- run: trunk build --release | |
- uses: actions/configure-pages@v5 | |
with: | |
enablement: true | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: "./dist" | |
- name: Deploy to GitHub Pages 🚀 | |
id: deployment | |
uses: actions/deploy-pages@v3 |