.github/workflows | ||
src | ||
static | ||
.dockerignore | ||
.gitignore | ||
.npmrc | ||
.prettierignore | ||
.prettierrc | ||
docker-compose.yml | ||
Dockerfile | ||
eslint.config.js | ||
package-lock.json | ||
package.json | ||
README.md | ||
svelte.config.js | ||
tsconfig.json | ||
update.sh | ||
vite.config.ts |
Urpagin.net
Deploy on Push (Continuous Deployment with Docker & GitHub Actions)
The following steps assume you are working on a Linux machine.
Steps to Set Up Continuous Deployment:
-
On your local machine, generate a new SSH key by running:
ssh-keygen -t ed25519 -f ~/.ssh/deploy_key
-
Copy the generated public SSH key to your server (the one where the website will run) by using the following command:
ssh-copy-id -i ~/.ssh/deploy_key.pub user@host
-
Go to your GitHub repository and navigate to: Settings -> Secrets and variables -> Actions -> New repository secret.
Add the following secrets:PROJECT_PATH
: The absolute path where you cloned your repository on the remote server (e.g.,/home/debian/urpagin-dot-net/
).SSH_USER
: The username used to log in to your remote server.SSH_HOST
: The IP address of the remote server.SSH_PRIVATE_KEY
: On your local machine, copy the contents of the~/.ssh/deploy_key
file, which contains the private SSH key.
-
On your remote server, run the
build_and_run.sh
script to start the project.
From this point onward, anygit push
action to themaster
branch will automatically trigger thebuild_and_run.sh
script, via SSH, to update the website.
Manual Deployment (Using Docker)
On your remote server, follow these steps:
-
Clone the repository:
git clone https://github.com/Urpagin/urpagin-dot-net.git
-
Navigate to the project directory:
cd urpagin-dot-net/
-
Make the
build_and_run.sh
script executable:chmod +x build_and_run.sh
-
Run the script:
./build_and_run.sh
Manual Deployment (Using npm)
Developing
Start a development server:
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:
npm run build
You can preview the production build with npm run preview
.
To deploy your app, you may need to install an adapter for your target environment.