diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..e40368c --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,49 @@ +name: Deploy + +on: + push: + branches: [ "main" ] + workflow_dispatch: + +jobs: + runtime: + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + steps: + - name: 'Intitialize: Checkout repository' + uses: actions/checkout@v3 + - name: 'Intitialize: Summon NodeJS' + uses: actions/setup-node@v3 + with: + node-version: 18 + - name: 'Intitialize: Configure pnpm' + uses: pnpm/action-setup@v2.2.4 + id: pnpm-install + with: + version: 7 + run_install: false + - name: 'Cache: node_modules' + uses: actions/cache@v3 + with: + path: | + node_modules + ~/.local/share/pnpm/store/v3 + key: ${{ runner.OS }}-x86-node18-pnpm7-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.OS }}-x86-node18-pnpm7-${{ env.cache-name }}- + ${{ runner.OS }}-x86-node18-pnpm7- + - name: 'Intitialize: Install dependencies' + run: pnpm -r i --shamefully-hoist --prefer-offline + - name: 'Execute: Build' + run: pnpm build + - name: 'Deployment: Upload artifacts' + uses: actions/upload-pages-artifact@v1 + with: + path: dist + - name: 'Deployment: Deploy to target' + id: deployment + uses: actions/deploy-pages@v1 + - name: 'Post-deplotyment: Logging' + run: echo "Deployed at ${{ steps.deployment.outputs.page_url }}" diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..8dfee63 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "yaml.schemas": { + "https://json.schemastore.org/github-workflow.json": "file:///Users/rayriffy/Git/sushiro/.github/workflows/deploy.yml" + } +} \ No newline at end of file