Skip to content

Commit

Permalink
Setup GitHub Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
barinbritva committed Feb 5, 2024
1 parent 321655e commit 6829590
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true

[*.{js,jsx,ts,tsx}]
[*.{js,jsx,ts,tsx,json,yml}]
indent_style = space
indent_size = 2
48 changes: 48 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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 only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: 'pages'
cancel-in-progress: false

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@v4
- name: Node
uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run typedoc
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
19 changes: 19 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Pull Request
on: [pull_request]

jobs:
check-app:
name: Check App
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci

- name: Check lint
run: npm run lint

- name: Check types
run: npm run check-types
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
dist
node_modules
dist
docs
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
{
"name": "ton-gamefi",
"private": true,
"engines": {
"node": "^18.0.0",
"npm": "^9.0.0"
},
"workspaces": ["packages/phaser"],
"scripts": {
"check-types": "tsc --noEmit",
"typedoc": "typedoc --out docs packages/phaser/src/index.ts"
"typedoc": "typedoc --out docs packages/phaser/src/index.ts",
"lint": "prettier --check \"./**/*.{js,jsx,ts,tsx,json,yml}\""
},
"devDependencies": {
"@types/node": "^20.10.7",
Expand Down

0 comments on commit 6829590

Please sign in to comment.