Skip to content

Commit

Permalink
Publish to netlify
Browse files Browse the repository at this point in the history
  • Loading branch information
benabel committed Dec 16, 2023
1 parent 56de9d7 commit c8c35fd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 25 deletions.
37 changes: 15 additions & 22 deletions .github/workflows/publish-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,26 +50,19 @@ jobs:
run: pnpm i

- name: build site
run: pnpm build
run: pnpm build && pnpm postbuild

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./_site

# Deploy job
deploy:
# Add a dependency to the build job
needs: build

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3 # or specific "vX.X.X" version tag for this action
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './_site'
production-branch: master
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-pull-request-comment: false
enable-commit-comment: true
overwrites-pull-request-comment: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1
3 changes: 0 additions & 3 deletions eleventy.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
const md2HTML = require("./scripts/build/md2HTML.cjs").md2HTML;

module.exports = function (eleventyConfig) {
// needed for gh-pages
pathPrefix: "/ed-lib/"

// Add emd as a valid extension to process
eleventyConfig.addExtension(["emd"], {
key: "html",
Expand Down
4 changes: 4 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[[headers]]
for = "/*"
[headers.values]
X-Robots-Tag = "all"

0 comments on commit c8c35fd

Please sign in to comment.