-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add website with Eleventy based off Opensac.org theme. (#25)
* Create deploy-gh-pages.yml * Initialize Eleventy site with Open Sac theme. * Add pages for Opensac.org and Learning Blocks. * Add github pages pathprefix during deployment.
- Loading branch information
Showing
58 changed files
with
13,514 additions
and
0 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,28 @@ | ||
const yaml = require('js-yaml') | ||
|
||
/** | ||
* Configuration for Eleventy. | ||
* See: /public/documentation/eleventy-configuration.md | ||
* Supports: | ||
* - Yaml data files | ||
* | ||
* @parameter config Eleventy configuration object. | ||
* @return The return object is separate from the Eleventy configuration object. | ||
*/ | ||
const eleventyConfig = config => { | ||
config.ignores.add('README.md') | ||
config.addPassthroughCopy('public') | ||
config.addDataExtension('yml', contents => yaml.load(contents)) | ||
config.addWatchTarget('./styles/') | ||
return { | ||
dir: { | ||
input: 'content', | ||
includes: '../_includes' | ||
}, | ||
compileOptions: { | ||
cache: false | ||
} | ||
} | ||
} | ||
|
||
module.exports = eleventyConfig |
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,32 @@ | ||
name: Deploy Next.js static site to GitHub pages | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [ 21.x ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Build Next.js static site | ||
run: | | ||
npm install | ||
npm run build-ghpages | ||
- name: Ignore Jekyll | ||
run: | | ||
touch _site/.nojekyll | ||
- name: Deploy 🚀 | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: _site | ||
git-config-name: Automated | ||
git-config-email: [email protected] | ||
branch: gh-pages |
Oops, something went wrong.