An overview of the

This blog is based on Vuepress. The other two posts are:

After building a personal blog, the files of the blog can run smoothly locally. Finally, it is left to deploy it to the server. At the beginning, I directly executed the build command locally, then pushed the generated files to Github, and finally pulled the github files from the server to the corresponding directory on the server. At the beginning, there were a lot of scripts that needed to be executed manually. Later, my friend recommended that I could open a timing script on the server. Then pull up github projects regularly, and we only need to focus on push operation, which is actually quite good (you can see his summary for details). Finally, I did not adopt this scheme, because I came to know that github Action, a function of Github, looks very good. It helps us to do some general reusable workflows, then try to understand and use this feature. Details can be found in the official documentation. Ali cloud (domain name is also in the application of the above, the record of what has been finished in the above, is the public security for the record Needs to be done on another website, configured server access port, the domain name to access and nginx, directly through the domain to be able to access to the default CentOS page can prove that the concrete operation can search by oneself, These are simple configurations. If you have any questions about this part, please feel free to comment. Another option is to publish directly to the github. IO domain, which anyone interested can search for.


perform

Create a.github/workflows/ directory under the root directory. The.yml files in this directory will be the main logic, with arbitrary names (e.g. In the Actions TAB of the remote repository, you can see that the workflows was running and the result is displayed as success or failure. Name: indicates the name of the Workflows in the Actions TAB. On: indicates which branch will execute the workflow when pushed. Jobs: indicates the main logic of the workflow


The problem

Parameters required by HENGkx/SSH-deploy are the public address of the server, user name, password, port, compiled directory and target directory of the server. These data can be created using github repository -> Settings -> Secrets. Dist: ‘dist dir’, root in.vuepress/config.js


The end of the

After the configuration, each push on the master branch will trigger the workflow (packaging and uploading files to the server), each update does not need to repeat packaging, uploading to the server these operations