Skip to content

Commit

Permalink
Update website GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
johanventer committed Sep 20, 2023
1 parent 65bd40b commit fe4c91a
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
# Trigger the workflow every time you push to the `main` branch
# Using a different branch name? Replace `main` with your branch’s name
push:
branches: [ main ]
branches: [main]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:

Expand All @@ -20,12 +20,25 @@ jobs:
steps:
- name: Checkout your repository using git
uses: actions/checkout@v3
- name: Install, build, and upload your site
uses: withastro/action@v0

- name: Use Node 16
uses: actions/setup-node@v3
with:
node-version: 16

- name: Root npm install
run: npm install

- name: Website npm install
run: cd website && npm install

- name: Build website
run: cd website && npm run build

- name: Upload to GitHub pages
uses: actions/upload-pages-artifact@v1
with:
path: website # The root location of your Astro project inside the repository. (optional)
package-manager: npm # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
# node-version: 16 # The specific version of Node that should be used to build your site. Defaults to 16. (optional)
path: website/dist/

deploy:
needs: build
Expand All @@ -36,4 +49,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v1

0 comments on commit fe4c91a

Please sign in to comment.