Skip to content

Commit

Permalink
[ADD] Automatic deploy by GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
eolunas committed Jan 30, 2024
1 parent facdb15 commit cf179b6
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 3 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy to GitHub Pages

on:
push:
branches: [main]

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v3
- name: Install, build, and upload your site
uses: withastro/action@v1
# with:
# path: . # The root location of your Astro project inside the repository. (optional)
# node-version: 18 # The specific version of Node that should be used to build your site. Defaults to 18. (optional)
# package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
8 changes: 5 additions & 3 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { defineConfig } from 'astro/config';
import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind";

import preact from "@astrojs/preact";

// https://astro.build/config
export default defineConfig({
integrations: [tailwind(), preact()]
});
integrations: [tailwind(), preact()],
site: "https://eolunas.github.io",
base: "/portfolio",
});

0 comments on commit cf179b6

Please sign in to comment.