Skip to content

Commit

Permalink
Add deploy gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
MathyouMB committed Jul 2, 2023
1 parent 29831a5 commit 10530cb
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
34 changes: 34 additions & 0 deletions .github/workflows/deploy-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy App

on:
push:
branches:
- main # Set a branch to deploy
pull_request:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0

# Install dependencies with npm
- name: Install dependencies
run: |
npm ci
# Build the project and add .nojekyll file to supress default behaviour
- name: Build
run: |
npm run build
touch ./dist/.nojekyll
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./app/dist
3 changes: 2 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ import react from "@astrojs/react";

// https://astro.build/config
export default defineConfig({
integrations: [mdx(), react()]
integrations: [mdx(), react()],
site: 'https://resources.carletoncomputerscience.ca',
});

0 comments on commit 10530cb

Please sign in to comment.