Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy svelte generated website #71

Closed
malhotramanik opened this issue Sep 27, 2020 · 3 comments · Fixed by #72
Closed

deploy svelte generated website #71

malhotramanik opened this issue Sep 27, 2020 · 3 comments · Fixed by #72
Assignees
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers

Comments

@malhotramanik
Copy link

No description provided.

@eddiejaoude
Copy link
Member

eddiejaoude commented Sep 27, 2020

Thank you creating the issue @malhotramanik 👍

Currently the svelte website is generated on the command npm run build into the public directory. On GitHub Pages the only directories that are deployed are / (root) and docs/.

We could use a GitHub Action to deploy to a branch from any folder:

In file .github/workflows/deploy.yml

name: Build and Deploy
on:
  push:
    branches:
      - main
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout 🛎️
        uses: actions/checkout@v2.3.1 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
        with:
          persist-credentials: false

      - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
        run: |
          npm install
          npm run build

      - name: Deploy 🚀
        uses: JamesIves/github-pages-deploy-action@3.6.1
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          BRANCH: gh-pages # The branch the action should deploy to.
          FOLDER: build # The folder the action should deploy.
          CLEAN: true # Automatically remove deleted files from the deploy branch

https://github.com/marketplace/actions/deploy-to-github-pages

@eddiejaoude eddiejaoude added bug Something isn't working enhancement New feature or request good first issue Good for newcomers labels Sep 27, 2020
@RemcoHalman
Copy link
Member

@eddiejaoude I could add it today/tomorrow. If no one else wants to add it.

@eddiejaoude
Copy link
Member

Sure @RemcoHalman 👍 - sounds good. I can assign it to you 🤓

eddiejaoude pushed a commit that referenced this issue Sep 27, 2020
* feat: added github deploy action

* Update deploy.yml
UnevenCoder added a commit to UnevenCoder/EddieJaoudeCommunity.github.io that referenced this issue Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants