Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security (yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha): An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.

Source: opengrep

with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
168 changes: 0 additions & 168 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "codespaces-react",
"homepage": "https://GYFX35.github.io/codespaces-react",
"version": "0.1.0",
"private": true,
"dependencies": {
Expand All @@ -19,7 +20,7 @@
"start": "BROWSER=none WDS_SOCKET_PORT=0 vite --port 3000",
"build": "vite build",
"preview": "vite preview",
"test": "vitest"
"test": "vitest run"
},
"eslintConfig": {
"extends": [
Expand Down
1 change: 1 addition & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import react from "@vitejs/plugin-react";

// https://vitejs.dev/config/
export default defineConfig({
base: "/codespaces-react/",
plugins: [react()],
test: {
globals: true,
Expand Down
Loading