Merge branch 'main' into v9
This commit is contained in:
commit
2296dc9ae2
45
.github/workflows/deploy-pages.yml
vendored
Normal file
45
.github/workflows/deploy-pages.yml
vendored
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
name: Deploy to GitHub Pages
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: '18'
|
||||||
|
|
||||||
|
- name: Cache npm
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
|
||||||
|
|
||||||
|
- name: Cache Eleventy .cache
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ./.cache
|
||||||
|
key: ${{ runner.os }}-eleventy-fetch-cache
|
||||||
|
|
||||||
|
|
||||||
|
- run: npm install
|
||||||
|
- run: npm run build-ghpages
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: ./_site
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
_site/
|
_site/
|
||||||
node_modules/
|
node_modules/
|
||||||
package-lock.json
|
package-lock.json
|
||||||
|
.cache
|
||||||
|
@ -56,6 +56,6 @@
|
|||||||
|
|
||||||
<footer></footer>
|
<footer></footer>
|
||||||
|
|
||||||
<!-- Current page: {{ page.url | htmlBaseUrl }} -->
|
<!-- This page `{{ page.url | htmlBaseUrl }}` was built on {% currentBuildDate %} -->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -14,7 +14,7 @@ export default function(eleventyConfig) {
|
|||||||
// e.g. <img loading decoding> assigned on the HTML tag will override these values.
|
// e.g. <img loading decoding> assigned on the HTML tag will override these values.
|
||||||
defaultAttributes: {
|
defaultAttributes: {
|
||||||
loading: "lazy",
|
loading: "lazy",
|
||||||
decoding: "async"
|
decoding: "async",
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -94,6 +94,10 @@ export default async function(eleventyConfig) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
eleventyConfig.addShortcode("currentBuildDate", () => {
|
||||||
|
return (new Date()).toISOString();
|
||||||
|
})
|
||||||
|
|
||||||
// Features to make your build faster (when you need them)
|
// Features to make your build faster (when you need them)
|
||||||
|
|
||||||
// If your passthrough copy gets heavy and cumbersome, add this line
|
// If your passthrough copy gets heavy and cumbersome, add this line
|
||||||
|
Loading…
Reference in New Issue
Block a user