diff --git a/.github/workflows/deploy-app.yml b/.github/workflows/deploy-app.yml new file mode 100644 index 0000000..cc487b1 --- /dev/null +++ b/.github/workflows/deploy-app.yml @@ -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 \ No newline at end of file diff --git a/astro.config.mjs b/astro.config.mjs index a063da8..797236c 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -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', });