From 3a1e7c031ba50ee91071a9ec8cfba0a503379c9c Mon Sep 17 00:00:00 2001 From: Swapnil Tripathi Date: Sat, 30 Sep 2023 23:21:01 +0530 Subject: [PATCH] add workflow --- .github/workflows/deploy.yml | 57 ++++++++++++++++++++++++++++++++++ .gitignore | 2 +- README.md | 38 ----------------------- src/components/header.svelte | 5 ++- src/routes/about/+page.svelte | 1 - static/images/clntk.jpg | Bin 7490 -> 0 bytes static/images/lightning.png | Bin 0 -> 88055 bytes 7 files changed, 60 insertions(+), 43 deletions(-) create mode 100644 .github/workflows/deploy.yml delete mode 100644 README.md delete mode 100644 static/images/clntk.jpg create mode 100644 static/images/lightning.png diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..db024a1 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,57 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: 'main' + +jobs: + build_site: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + # If you're using pnpm, add this step then change the commands and cache key below to use `pnpm` + # - name: Install pnpm + # uses: pnpm/action-setup@v2 + # with: + # version: 8 + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: npm + + - name: Install dependencies + run: npm install + + - name: build + env: + BASE_PATH: '/' + run: | + npm run build + touch build/.nojekyll + + - name: Upload Artifacts + uses: actions/upload-pages-artifact@v1 + with: + # this should match the `pages` option in your adapter-static options + path: 'build/' + + deploy: + needs: build_site + runs-on: ubuntu-latest + + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy + id: deployment + uses: actions/deploy-pages@v1 diff --git a/.gitignore b/.gitignore index 6635cf5..7eda99a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ .DS_Store -node_modules +/node_modules /build /.svelte-kit /package diff --git a/README.md b/README.md deleted file mode 100644 index 5c91169..0000000 --- a/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# create-svelte - -Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). - -## Creating a project - -If you're seeing this, you've probably already done this step. Congrats! - -```bash -# create a new project in the current directory -npm create svelte@latest - -# create a new project in my-app -npm create svelte@latest my-app -``` - -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - -```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open -``` - -## Building - -To create a production version of your app: - -```bash -npm run build -``` - -You can preview the production build with `npm run preview`. - -> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. diff --git a/src/components/header.svelte b/src/components/header.svelte index eae7b36..2c83efc 100644 --- a/src/components/header.svelte +++ b/src/components/header.svelte @@ -9,7 +9,6 @@

{config.title}

-