generated from smwhr/dendry-starter-pack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 328fed6
Showing
8 changed files
with
4,669 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Simple workflow for deploying static content to GitHub Pages | ||
name: Deploy static content to Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ["main"] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow one concurrent deployment | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
# Single deploy job since we're just deploying | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: setup node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16 | ||
- name: Install | ||
run: npm install | ||
- name: Build game | ||
run: npm run dendry make-html | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: 'out/html' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.DS_Store | ||
node_modules | ||
out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Dendry Starter Pack | ||
|
||
This is a starter pack for [Dendry](https://github.com/aucchen/dendry) games. It includes a | ||
basic game structure, a sample story, and a few useful extensions. | ||
|
||
## Getting Started | ||
|
||
First, duplicate (fork) this repository by clicking the "Use this template" button in the top right. | ||
<img width="176" alt="image" src="https://github.com/smwhr/dendry-starter-pack/assets/1090485/425a706a-ec08-49ff-a573-f6a768525ba9"> | ||
and choose "create a new repository". | ||
|
||
If you have a working node environment, we recommand running it locally (see below). Otherwise, you can do everything in the browser. | ||
|
||
## Running on github pages | ||
|
||
### Activate pages | ||
|
||
In your forked repository, click the "Settings" button, then scroll down to the "Pages" section. | ||
In the "Build and deploy" section, select the "Github Actions" option, then click "Save". | ||
<img height="331" alt="image" src="https://github.com/smwhr/dendry-starter-pack/assets/1090485/322c183f-cb5d-423b-b81a-acd19fb70600"> | ||
|
||
|
||
### Edit the story | ||
|
||
To open the github development environment by just pressing `.` in the browser. | ||
<img width="1030" alt="image" src="https://github.com/smwhr/dendry-starter-pack/assets/1090485/8d41e0cf-06f2-4ffa-a8e1-e164baa52ad6"> | ||
|
||
It will allow you to modify the files in the repository directly from the browser. | ||
Each time you're satisfied with your changes, save (commit) them by clicking the "Commit and push" button in the source control <img height="20" alt="image" src="https://github.com/smwhr/dendry-starter-pack/assets/1090485/5bf0742a-61ad-490e-bc19-7c74a37c88a8"> menu. You'll need to add a "commit message" every time (it'll help you track your changes, but don't sweat it). | ||
|
||
<img width="349" alt="image" src="https://github.com/smwhr/dendry-starter-pack/assets/1090485/15d24de9-cb17-478e-a479-24564303f830"> | ||
|
||
|
||
### Publish the game | ||
Each time you commit, it will automatically build the game and publish it on github pages (at the url https://YOURHANDLE.github.io/YOURREPONAME). | ||
If an error occurs (because you made a mistake in your code), you can see the logs in the "Actions" tab. | ||
|
||
## Running locally | ||
|
||
First of all, clone your forked repository. | ||
|
||
### Install dependencies | ||
Run `npm install` in the repository folder. | ||
|
||
### Build the game | ||
Run `npm run dendry make-html` in the repository folder. | ||
This will build the game and put the result in the `out/html` folder. | ||
|
||
|
||
|
Oops, something went wrong.