-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
46a7b30
commit 5916983
Showing
2 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: GH Pages Deploy | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
pull_request: | ||
branches: [main] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout 🛎 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build 🔧 | ||
run: cargo build --release | ||
|
||
- name: Add paths | ||
run: echo "::add-path::$GITHUB_WORKSPACE/target/release" | ||
|
||
- name: Prepare site 🏗️ | ||
run: | | ||
cp -R example marmitesite | ||
rm marmitesite/content/* | ||
rm -rf marmitesite/site | ||
echo "---\ntitle:Markdown Makes Sites\ndate:2024-10-16\ntags:marmite,ssg\n---\n" > marmitesite/content/markdown-makes-sites.md | ||
cat README.md >> marmitesite/content/markdown-makes-sites.md | ||
echo "name:Marmite Site\ntagline: Site generated with marmite" > marmitesite/marmite.yaml | ||
- name: Build site 🏗️ | ||
run: cd marmitesite && marmite . site && cd .. | ||
|
||
- name: Deploy to GitHub Pages 🚀 | ||
if: ${{ github.event_name != 'pull_request' }} | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./marmitesite/site |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,5 +20,5 @@ | |
# - ["Path", "/relative-path"] | ||
# - ["External", "https://example.com"] | ||
|
||
data: | ||
foo: bar | ||
# data: | ||
# foo: bar |