-
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
Showing
19 changed files
with
5,203 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,11 @@ | ||
{ | ||
"ignores": [ | ||
"@types/node", | ||
"run-z", | ||
"eslint-config-standard", | ||
"eslint-plugin-import", | ||
"eslint-plugin-n", | ||
"eslint-plugin-promise", | ||
"typescript-json-schema" | ||
] | ||
} |
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 @@ | ||
{ | ||
"name": "samechan-vrchat-gacha", | ||
"image": "mcr.microsoft.com/devcontainers/typescript-node:0-18", | ||
"remoteUser": "node", | ||
"otherPortsAttributes": { | ||
"onAutoForward": "silent" | ||
}, | ||
"postCreateCommand": "sudo npm uninstall -g pnpm yarn && sudo chown node node_modules .pnpm-store && sudo corepack enable && corepack install && install", | ||
"waitFor": "postStartCommand", | ||
"mounts": [ | ||
"source=${localWorkspaceFolderBasename}-node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume", | ||
"source=pnpm-store,target=${containerWorkspaceFolder}/.pnpm-store,type=volume" | ||
], | ||
"customizations": { | ||
"settings": { | ||
"editor.formatOnSave": true, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": false | ||
} | ||
}, | ||
"git.branchProtection": [ | ||
"main", | ||
"master" | ||
] | ||
}, | ||
"extensions": [ | ||
"esbenp.prettier-vscode" | ||
], | ||
"vscode": { | ||
"settings": { | ||
"editor.formatOnSave": true, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": false | ||
} | ||
}, | ||
"git.branchProtection": [ | ||
"main", | ||
"master" | ||
] | ||
}, | ||
"extensions": [ | ||
"esbenp.prettier-vscode" | ||
] | ||
} | ||
} | ||
} |
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,54 @@ | ||
{ | ||
"sortToTop": [ | ||
"name", | ||
"version", | ||
"description", | ||
"keywords", | ||
"homepage", | ||
"bugs", | ||
"license", | ||
"author", | ||
"private", | ||
"files", | ||
"main", | ||
"types", | ||
"bin", | ||
"man", | ||
"directories", | ||
"repository", | ||
"scripts", | ||
"config", | ||
"dependencies", | ||
"devDependencies", | ||
"peerDependencies", | ||
"bundledDependencies", | ||
"optionalDependencies", | ||
"engines", | ||
"os", | ||
"cpu", | ||
"private", | ||
"publishConfig" | ||
], | ||
"required": [ | ||
"name", | ||
"version" | ||
], | ||
"warn": [ | ||
"description", | ||
"homepage", | ||
"bugs", | ||
"license", | ||
"author", | ||
"main", | ||
"repository" | ||
], | ||
"sortedSubItems": [ | ||
"files", | ||
"directories", | ||
"dependencies", | ||
"devDependencies", | ||
"peerDependencies", | ||
"bundledDependencies", | ||
"optionalDependencies" | ||
] | ||
} |
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,18 @@ | ||
# Node.js でビルド・テストを実行する。バージョンは .node-version に記載されているものを利用する | ||
|
||
name: Node CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
|
||
jobs: | ||
node-ci: | ||
name: Node CI | ||
uses: book000/templates/.github/workflows/reusable-nodejs-ci.yml@master |
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,97 @@ | ||
name: Update tweet | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
paths: | ||
- '**/*.ts' | ||
schedule: | ||
- cron: '0 * * * *' | ||
|
||
jobs: | ||
update-tweet: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: 🛎 Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🏗 Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .node-version | ||
cache: yarn | ||
cache-dependency-path: yarn.lock | ||
|
||
- name: Install apt dependencies | ||
uses: nick-fields/retry@v3 | ||
with: | ||
max_attempts: 3 | ||
retry_on: error | ||
timeout_minutes: 30 | ||
command: | | ||
sudo apt-get update | ||
sudo apt-get install -y curl fontconfig fonts-noto-cjk | ||
fc-cache -fv | ||
sudo apt-get install -y chromium-browser libnss3 libfreetype6 libfreetype6-dev libharfbuzz-bin ca-certificates fonts-freefont-ttf nodejs xvfb xauth dbus dbus-x11 | ||
- name: Install nodejs dependencies | ||
run: yarn | ||
|
||
- name: Update Tweet | ||
id: update-tweet | ||
run: | | ||
rm /tmp/.X*-lock || true | ||
rm -rf data/userdata/Singleton* || true | ||
Xvfb :99 -ac -screen 0 600x1000x16 -listen tcp & | ||
export DISPLAY=:99 | ||
yarn build | ||
kill -9 "$(pgrep -f "Xvfb" | awk '{print $2}')" || true | ||
env: | ||
TWITTER_USERNAME: ${{ secrets.TWITTER_USERNAME }} | ||
TWITTER_PASSWORD: ${{ secrets.TWITTER_PASSWORD }} | ||
TWITTER_AUTH_CODE_SECRET: ${{ secrets.TWITTER_AUTH_CODE_SECRET }} | ||
TWITTER_EMAIL_ADDRESS: ${{ secrets.TWITTER_EMAIL_ADDRESS }} | ||
PROXY_SERVER: ${{ secrets.PROXY_SERVER }} | ||
PROXY_USERNAME: ${{ secrets.PROXY_USERNAME }} | ||
PROXY_PASSWORD: ${{ secrets.PROXY_PASSWORD }} | ||
|
||
- name: Error handling | ||
if: failure() | ||
uses: Ilshidur/[email protected] | ||
with: | ||
args: '' | ||
env: | ||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | ||
DISCORD_EMBEDS: | | ||
[ | ||
{ | ||
"title": "Tweet Update Failed", | ||
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}", | ||
"color": 16711680 | ||
} | ||
] | ||
- name: Upload Pages-artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
if: always() | ||
with: | ||
path: output | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: update-tweet | ||
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@v4 |
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,134 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
.pnpm-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Snowpack dependency directory (https://snowpack.dev/) | ||
web_modules/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional stylelint cache | ||
.stylelintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variable files | ||
.env | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.env.local | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
.parcel-cache | ||
|
||
# Next.js build output | ||
.next | ||
out | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and not Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# vuepress v2.x temp and cache directory | ||
.temp | ||
.cache | ||
|
||
# Docusaurus cache and generated files | ||
.docusaurus | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# Stores VSCode versions used for testing VSCode extensions | ||
.vscode-test | ||
|
||
# yarn v2 | ||
.yarn/cache | ||
.yarn/unplugged | ||
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
|
||
# pnpm | ||
.pnpm-store | ||
data/ |
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 @@ | ||
20.16.0 |
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,12 @@ | ||
printWidth: 80 | ||
tabWidth: 2 | ||
useTabs: false | ||
semi: false | ||
quoteProps: 'as-needed' | ||
singleQuote: true | ||
jsxSingleQuote: true | ||
trailingComma: 'es5' | ||
bracketSpacing: true | ||
bracketSameLine: true | ||
arrowParens: 'always' | ||
endOfLine: lf |
Oops, something went wrong.