Skip to content

Commit

Permalink
Update and rename action.yaml to pages.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
manix84 authored May 22, 2024
1 parent 3e50c32 commit 9e9ae8d
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 35 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/action.yaml

This file was deleted.

62 changes: 62 additions & 0 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Deploy to GitHub-Pages

on:
push:
branches: ["main"]

pull_request:
branches: ["main"]

workflow_dispatch:

concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js 16
uses: actions/setup-node@v3

- name: Install dependencies
run: npm clean-install

- name: Build & Optimise Code
run: npm run build

- name: Export Static Code
run: npm run export

- name: Touch nojekyll File
run: touch ./out/.nojekyll

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: out/

deploy:
runs-on: ubuntu-latest

needs: build

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
with:
preview: true

0 comments on commit 9e9ae8d

Please sign in to comment.