diff --git a/src/assets/deploy_01.png b/src/assets/deploy_01.png new file mode 100644 index 0000000..c24754f Binary files /dev/null and b/src/assets/deploy_01.png differ diff --git a/src/assets/deploy_02.png b/src/assets/deploy_02.png new file mode 100644 index 0000000..0654987 Binary files /dev/null and b/src/assets/deploy_02.png differ diff --git a/src/assets/deploy_03.png b/src/assets/deploy_03.png new file mode 100644 index 0000000..cee4f6d Binary files /dev/null and b/src/assets/deploy_03.png differ diff --git a/src/content/docs/developing/local/getting-started.mdx b/src/content/docs/developing/local/getting-started.mdx index 413d3f7..769b1db 100644 --- a/src/content/docs/developing/local/getting-started.mdx +++ b/src/content/docs/developing/local/getting-started.mdx @@ -37,20 +37,50 @@ If you would prefer to change the default location, the user can right-click on The user can change the deploy directory at any by using the same right-click option on another directory. -## 3. The Deploy button / Running the deployment process +## 3. Deployment -Using the 'Deploy' button on the status bar will start the deployment process. If the workspace has more than one folder, the user will have to select which folder they want to deploy. +### Running the deployment +Using the `Deploy` button on the status bar will start the deployment process. If the workspace has more than one folder, the user will have to select which folder they want to deploy. +![](../../../../assets/deploy_01.png) -There are five options for deployment: +Running the deployment will prompt the user to chose a deployment method amongst the [five possible options](#deployment-methods), unless a default method has been selected in the [connection settings](#setting-the-default-deployment-method). +![](../../../../assets/deploy_02.png) -1. Working Changes: This only works if the chosen workspace folder is a git repository. Code for IBM i will look at the git status to determine the files that have been changed since the last commit (unstaged and staged) and only uploads those files. -2. Staged Changes: The same as the "Working Changes" option, but only uploads staged / indexed files. -3. All: Will upload all files in the chosen workspace folder. Will ignore files that are part of the '.gitignore' file if it exists. -4. Changes: Will upload only files that VSCode knows have changed in the workspace since the last deploy. -5. Compare: Will compare every file in the local workspace against the deploy location and upload only those detected as different (by means of MD5 checksums). This is also the only method that will delete files from the deploy location, if they have been removed from the local workspace folder. +### Deployment methods + +#### Working Changes +This only works if the chosen workspace folder is a git repository. Code for IBM i will look at the git status to determine the files that have been changed since the last commit (unstaged and staged) and only uploads those files. + +#### Staged Changes +The same as the `Working Changes` option, but only uploads staged / indexed files. + +#### All +Will upload all files in the chosen workspace folder. + +#### Changes +Will upload only files that VSCode knows have changed in the workspace since the last deploy. + +#### Compare +Will compare every file in the local workspace against the deploy location and upload only those detected as different (by means of MD5 checksums). This is also the only method that will delete files from the deploy location, if they have been removed from the local workspace folder. The user can also define Actions that are for the 'file' (local) type to run the deploy before running the Action. +### Setting the default deployment method +Open the connection settings, go to the `Source Code` tab and select the default deployment method to apply when running a deployment. +![](../../../../assets/deploy_03.png) + +### Ignore files during deployment with `.gitignore` and `.deployignore` +All the deployment methods will take into account the `.gitignore` file and they will not deploy files matching the patterns defined in it. + +For example, this pattern, if put in `.gitignore`, will prevent all the files under the project's `images` and `assets` folders from being deployed: +``` +images/** +assets/** +``` + +In case the patterns to ignore files during the deployment must be different from those found in `.gitignore`, a `.deployignore` file can be put at the root of the workspace folder. It will superseds `.gitignore` during the deployment to ignore files. `.deployignore` uses the same patterns as `.gitignore`. + + ## 4. Workspace Actions (deploy & build) {/* Lots of this text comes from the variables.md file */}