Skip to content

Commit

Permalink
Improve deploy action
Browse files Browse the repository at this point in the history
  • Loading branch information
henriquecf committed Nov 28, 2024
1 parent 0b67d5f commit 928c9aa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,32 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm install

- name: Build CSS
run: npm run build

- name: Copy necessary files
run: |
mkdir -p dist/images
cp -r images/* dist/images/
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .
publish_dir: ./dist
publish_branch: gh-pages
force_orphan: true
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Euruko 2025 website",
"main": "index.js",
"scripts": {
"build": "tailwindcss -i ./src/input.css -o ./dist/output.css && mkdir -p dist/images && cp -r src/images/* dist/images/",
"build": "tailwindcss -i ./src/input.css -o ./dist/output.css && cp index.html dist/ && mkdir -p dist/images && cp -r src/images/* dist/images/",
"watch": "tailwindcss -i ./src/input.css -o ./dist/output.css --watch",
"serve": "python3 -m http.server",
"start": "./scripts/start.sh",
Expand Down

0 comments on commit 928c9aa

Please sign in to comment.