Skip to content
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

Deploy/create action #26

Merged
merged 5 commits into from
Oct 19, 2024
Merged
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
50 changes: 50 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Build
run: |
npm run build
touch dist/.nojekyll
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22
20
4 changes: 2 additions & 2 deletions .sissi.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export default function(config) {
config.addPlugin(css);
return {
dir: {
input: 'demo',
input: 'docs',
output: 'dist'
}
}
}
}
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion demo/_includes/header.html → docs/_includes/header.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<header class="header">
<a href="/"><img src="/images/sissi.png" alt=""> <span class="visually-hidden">Logo</span></a>
<a href="/"><img src="images/sissi.png" alt=""> <span class="visually-hidden">Logo</span></a>
<svg viewBox="8 8 64 32" width="256" height="128" role="img" aria-labelledby="sissiTitle">
<title id="sissiTitle">sissi</title>
<g fill="none" stroke="currentColor" stroke-lineCap="round" stroke-lineJoin="round" stroke-width="2">
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion demo/_layouts/base.html → docs/_layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ title }} – Sissi Demo Site</title>
<link rel="stylesheet" href="/css/styles.css">
<link rel="stylesheet" href="css/styles.css">
</head>
<body>
<html-include src="header.html"/>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/resolver.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('resolve', () => {
before(() => {
config = new SissiConfig({
dir: {
input: 'demo',
input: 'docs',
output: 'dist',
}
});
Expand Down