Skip to content

Commit

Permalink
add workflow for deploying
Browse files Browse the repository at this point in the history
  • Loading branch information
aashutoshrathi committed Aug 1, 2024
1 parent 580ebb6 commit f7c707b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Update Deployment

on:
push:
branches:
- "*"

jobs:
publish:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20'

- name: Install dependencies
run: cd client && npm install

- name: Remove .gitignore
run: rm -rf client/.gitignore

- name: Generate your content
run: npm run build:client

- name: Publish current workdir (which contains generated content) to GitHub Pages
uses: rayluo/[email protected]

with:
source-directory: client
target-branch: gh-pages
2 changes: 1 addition & 1 deletion client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
<div id="game">
<canvas id="canvas"></canvas>
</div>
<script src="build/comets.js"></script>
<script src="./build/comets.js"></script>
</body>
</html>

0 comments on commit f7c707b

Please sign in to comment.