Skip to content

Commit c89b2b0

Browse files
committed
config to deploy to gh page
1 parent 45386cc commit c89b2b0

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

.github/workflows/deploy.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
# Trigger the workflow every time you push to the `main` branch
5+
# Using a different branch name? Replace `main` with your branch’s name
6+
push:
7+
branches: [main]
8+
# Allows you to run this workflow manually from the Actions tab on GitHub.
9+
workflow_dispatch:
10+
11+
# Allow this job to clone the repo and create a page deployment
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout your repository using git
22+
uses: actions/checkout@v4
23+
- name: Install, build, and upload your site output
24+
uses: withastro/action@v3
25+
26+
# with:
27+
# path: . # The root location of your Astro project inside the repository. (optional)
28+
# node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 18. (optional)
29+
# 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)
30+
31+
deploy:
32+
needs: build
33+
runs-on: ubuntu-latest
34+
environment:
35+
name: github-pages
36+
url: ${{ steps.deployment.outputs.page_url }}
37+
steps:
38+
- name: Deploy to GitHub Pages
39+
id: deployment
40+
uses: actions/deploy-pages@v4

astro.config.mjs

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ import tailwind from "@astrojs/tailwind";
66
export default defineConfig({
77
integrations: [tailwind({
88
applyBaseStyles: false,
9-
}),]
9+
})],
10+
site: "https://ke-duong.com",
1011
});

public/CNAME

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ke-duong.com

0 commit comments

Comments
 (0)